<!-- HTML header for doxygen 1.8.8-->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
    <head>
        <meta http-equiv="X-UA-Compatible" content="IE=edge">
        <!-- For Mobile Devices -->
        <meta name="viewport" content="width=device-width, initial-scale=1">
        <meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
        <meta name="generator" content="Doxygen 1.8.18"/>
        <script type="text/javascript" src="https://code.jquery.com/jquery-2.1.1.min.js"></script>
        <title>HElib: /HElib/include/helib/PolyMod.h Source File</title>
        <!--<link href="tabs.css" rel="stylesheet" type="text/css"/>-->
        <script type="text/javascript" src="dynsections.js"></script>
        <link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
        <link href="doxygen.css" rel="stylesheet" type="text/css" />
        <link href="customdoxygen.css" rel="stylesheet" type="text/css"/>
        <link href='https://fonts.googleapis.com/css?family=Roboto+Slab' rel='stylesheet' type='text/css'>
		<link href="https://fonts.googleapis.com/css2?family=IBM+Plex+Sans:ital,wght@0,100;1,700&family=Merriweather&family=Merriweather+Sans&family=Open+Sans&family=Poppins:ital@1&family=Roboto:ital,wght@0,400;1,300;1,900&display=swap" rel="stylesheet"> 
        <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css">
        <script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/js/bootstrap.min.js"></script>
        <link href="jquery.smartmenus.bootstrap.css" rel="stylesheet">
        <script type="text/javascript" src="jquery.smartmenus.js"></script>
        <!-- SmartMenus jQuery Bootstrap Addon -->
        <script type="text/javascript" src="jquery.smartmenus.bootstrap.js"></script>
        <!-- SmartMenus jQuery plugin -->
    </head>
    <body style="font-family: 'Merriweather', serif;">
        <nav class="navbar navbar-default" role="navigation">
            <div class="container">
                <div class="navbar-header">
                    <a class="navbar-brand">HElib Implementing Homomorphic Encryption</a>
                </div>
            </div>
        </nav>
        <div id="top"><!-- do not remove this div, it is closed by doxygen! -->
            <div class="content" id="content">
                <div class="container">
                    <div class="row">
                        <div class="col-sm-12 panel " style="padding-bottom: 15px;">
                            <div style="margin-bottom: 15px;">
<!-- end header part -->
<!-- Generated by Doxygen 1.8.18 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
var searchBox = new SearchBox("searchBox", "search",false,'Search');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(function() {
  initMenu('',true,false,'search.php','Search');
  $(document).ready(function() { init_search(); });
});
/* @license-end */</script>
<div id="main-nav"></div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div id="nav-path" class="navpath">
  <ul>
<li class="navelem"><a class="el" href="dir_d44c64559bbebec7f509842c48db8b23.html">include</a></li><li class="navelem"><a class="el" href="dir_d0c4ae63660968bf6b1c77a1e8aecf95.html">helib</a></li>  </ul>
</div>
</div><!-- top -->
<div class="header">
  <div class="headertitle">
<div class="title">PolyMod.h</div>  </div>
</div><!--header-->
<div class="contents">
<a href="_poly_mod_8h.html">Go to the documentation of this file.</a><div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno">    1</span>&#160;<span class="comment">/* Copyright (C) 2019 IBM Corp.</span></div>
<div class="line"><a name="l00002"></a><span class="lineno">    2</span>&#160;<span class="comment"> * This program is Licensed under the Apache License, Version 2.0</span></div>
<div class="line"><a name="l00003"></a><span class="lineno">    3</span>&#160;<span class="comment"> * (the &quot;License&quot;); you may not use this file except in compliance</span></div>
<div class="line"><a name="l00004"></a><span class="lineno">    4</span>&#160;<span class="comment"> * with the License. You may obtain a copy of the License at</span></div>
<div class="line"><a name="l00005"></a><span class="lineno">    5</span>&#160;<span class="comment"> *   http://www.apache.org/licenses/LICENSE-2.0</span></div>
<div class="line"><a name="l00006"></a><span class="lineno">    6</span>&#160;<span class="comment"> * Unless required by applicable law or agreed to in writing, software</span></div>
<div class="line"><a name="l00007"></a><span class="lineno">    7</span>&#160;<span class="comment"> * distributed under the License is distributed on an &quot;AS IS&quot; BASIS,</span></div>
<div class="line"><a name="l00008"></a><span class="lineno">    8</span>&#160;<span class="comment"> * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.</span></div>
<div class="line"><a name="l00009"></a><span class="lineno">    9</span>&#160;<span class="comment"> * See the License for the specific language governing permissions and</span></div>
<div class="line"><a name="l00010"></a><span class="lineno">   10</span>&#160;<span class="comment"> * limitations under the License. See accompanying LICENSE file.</span></div>
<div class="line"><a name="l00011"></a><span class="lineno">   11</span>&#160;<span class="comment"> */</span></div>
<div class="line"><a name="l00012"></a><span class="lineno">   12</span>&#160; </div>
<div class="line"><a name="l00013"></a><span class="lineno">   13</span>&#160;<span class="preprocessor">#ifndef HELIB_POLYMOD_H</span></div>
<div class="line"><a name="l00014"></a><span class="lineno">   14</span>&#160;<span class="preprocessor">#define HELIB_POLYMOD_H</span></div>
<div class="line"><a name="l00015"></a><span class="lineno">   15</span>&#160; </div>
<div class="line"><a name="l00016"></a><span class="lineno">   16</span>&#160;<span class="preprocessor">#include &lt;NTL/ZZX.h&gt;</span></div>
<div class="line"><a name="l00017"></a><span class="lineno">   17</span>&#160;<span class="preprocessor">#include &lt;vector&gt;</span></div>
<div class="line"><a name="l00018"></a><span class="lineno">   18</span>&#160;<span class="preprocessor">#include &lt;memory&gt;</span></div>
<div class="line"><a name="l00019"></a><span class="lineno">   19</span>&#160;<span class="preprocessor">#include &lt;<a class="code" href="_poly_mod_ring_8h.html">helib/PolyModRing.h</a>&gt;</span></div>
<div class="line"><a name="l00020"></a><span class="lineno">   20</span>&#160; </div>
<div class="line"><a name="l00025"></a><span class="lineno">   25</span>&#160;<span class="keyword">namespace </span><a class="code" href="namespacehelib.html">helib</a> {</div>
<div class="line"><a name="l00026"></a><span class="lineno">   26</span>&#160; </div>
<div class="line"><a name="l00046"></a><span class="lineno"><a class="line" href="classhelib_1_1_poly_mod.html">   46</a></span>&#160;<span class="keyword">class </span><a class="code" href="classhelib_1_1_poly_mod.html">PolyMod</a></div>
<div class="line"><a name="l00047"></a><span class="lineno">   47</span>&#160;{</div>
<div class="line"><a name="l00048"></a><span class="lineno">   48</span>&#160;<span class="keyword">public</span>:</div>
<div class="line"><a name="l00055"></a><span class="lineno">   55</span>&#160;  <a class="code" href="classhelib_1_1_poly_mod.html#aeb89d0ed7ac9fa2c96e5a61caddef9d9">PolyMod</a>();</div>
<div class="line"><a name="l00056"></a><span class="lineno">   56</span>&#160; </div>
<div class="line"><a name="l00064"></a><span class="lineno">   64</span>&#160;  <span class="keyword">explicit</span> <a class="code" href="classhelib_1_1_poly_mod.html#aeb89d0ed7ac9fa2c96e5a61caddef9d9">PolyMod</a>(<span class="keyword">const</span> std::shared_ptr&lt;PolyModRing&gt;&amp; ringDescriptor);</div>
<div class="line"><a name="l00065"></a><span class="lineno">   65</span>&#160; </div>
<div class="line"><a name="l00074"></a><span class="lineno">   74</span>&#160;  <a class="code" href="classhelib_1_1_poly_mod.html#aeb89d0ed7ac9fa2c96e5a61caddef9d9">PolyMod</a>(<span class="keywordtype">long</span> input, <span class="keyword">const</span> std::shared_ptr&lt;PolyModRing&gt;&amp; ringDescriptor);</div>
<div class="line"><a name="l00075"></a><span class="lineno">   75</span>&#160; </div>
<div class="line"><a name="l00085"></a><span class="lineno">   85</span>&#160;  <a class="code" href="classhelib_1_1_poly_mod.html#aeb89d0ed7ac9fa2c96e5a61caddef9d9">PolyMod</a>(<span class="keyword">const</span> std::vector&lt;long&gt;&amp; input,</div>
<div class="line"><a name="l00086"></a><span class="lineno">   86</span>&#160;          <span class="keyword">const</span> std::shared_ptr&lt;PolyModRing&gt;&amp; ringDescriptor);</div>
<div class="line"><a name="l00087"></a><span class="lineno">   87</span>&#160; </div>
<div class="line"><a name="l00095"></a><span class="lineno">   95</span>&#160;  <a class="code" href="classhelib_1_1_poly_mod.html#aeb89d0ed7ac9fa2c96e5a61caddef9d9">PolyMod</a>(<span class="keyword">const</span> NTL::ZZX&amp; input,</div>
<div class="line"><a name="l00096"></a><span class="lineno">   96</span>&#160;          <span class="keyword">const</span> std::shared_ptr&lt;PolyModRing&gt;&amp; ringDescriptor);</div>
<div class="line"><a name="l00097"></a><span class="lineno">   97</span>&#160; </div>
<div class="line"><a name="l00102"></a><span class="lineno"><a class="line" href="classhelib_1_1_poly_mod.html#abde46a8c8bf2c45613fbc04c7cf1f5c3">  102</a></span>&#160;  <a class="code" href="classhelib_1_1_poly_mod.html#abde46a8c8bf2c45613fbc04c7cf1f5c3">PolyMod</a>(<span class="keyword">const</span> <a class="code" href="classhelib_1_1_poly_mod.html">PolyMod</a>&amp; input) = <span class="keywordflow">default</span>;</div>
<div class="line"><a name="l00103"></a><span class="lineno">  103</span>&#160; </div>
<div class="line"><a name="l00107"></a><span class="lineno"><a class="line" href="classhelib_1_1_poly_mod.html#a5ea5d7bc3cf99fb0941fd5a134b38cb7">  107</a></span>&#160;  <a class="code" href="classhelib_1_1_poly_mod.html#a5ea5d7bc3cf99fb0941fd5a134b38cb7">PolyMod</a>(<a class="code" href="classhelib_1_1_poly_mod.html">PolyMod</a>&amp;&amp; input) noexcept = <span class="keywordflow">default</span>;</div>
<div class="line"><a name="l00108"></a><span class="lineno">  108</span>&#160; </div>
<div class="line"><a name="l00112"></a><span class="lineno"><a class="line" href="classhelib_1_1_poly_mod.html#acabfe2e0ceb18342c0e0ad40fe451251">  112</a></span>&#160;  <a class="code" href="classhelib_1_1_poly_mod.html#acabfe2e0ceb18342c0e0ad40fe451251">~PolyMod</a>() = <span class="keywordflow">default</span>;</div>
<div class="line"><a name="l00113"></a><span class="lineno">  113</span>&#160; </div>
<div class="line"><a name="l00118"></a><span class="lineno"><a class="line" href="classhelib_1_1_poly_mod.html#a525bedf9f9045606f4671a42a736330c">  118</a></span>&#160;  <a class="code" href="classhelib_1_1_poly_mod.html">PolyMod</a>&amp; <a class="code" href="classhelib_1_1_poly_mod.html#a525bedf9f9045606f4671a42a736330c">operator=</a>(<span class="keyword">const</span> <a class="code" href="classhelib_1_1_poly_mod.html">PolyMod</a>&amp; input) = <span class="keywordflow">default</span>;</div>
<div class="line"><a name="l00119"></a><span class="lineno">  119</span>&#160; </div>
<div class="line"><a name="l00123"></a><span class="lineno"><a class="line" href="classhelib_1_1_poly_mod.html#ac7093980d7d850145dbb918c1c821930">  123</a></span>&#160;  <a class="code" href="classhelib_1_1_poly_mod.html">PolyMod</a>&amp; <a class="code" href="classhelib_1_1_poly_mod.html#ac7093980d7d850145dbb918c1c821930">operator=</a>(<a class="code" href="classhelib_1_1_poly_mod.html">PolyMod</a>&amp;&amp; input) =</div>
<div class="line"><a name="l00124"></a><span class="lineno">  124</span>&#160;      <span class="keywordflow">default</span>; <span class="comment">// noexcept removed as NTL has non-noexcept move constructors</span></div>
<div class="line"><a name="l00130"></a><span class="lineno">  130</span>&#160;<span class="comment"></span>  <a class="code" href="classhelib_1_1_poly_mod.html">PolyMod</a>&amp; <a class="code" href="classhelib_1_1_poly_mod.html#a525bedf9f9045606f4671a42a736330c">operator=</a>(<span class="keywordtype">long</span> input);</div>
<div class="line"><a name="l00131"></a><span class="lineno">  131</span>&#160; </div>
<div class="line"><a name="l00138"></a><span class="lineno">  138</span>&#160;  <a class="code" href="classhelib_1_1_poly_mod.html">PolyMod</a>&amp; <a class="code" href="classhelib_1_1_poly_mod.html#a525bedf9f9045606f4671a42a736330c">operator=</a>(<span class="keyword">const</span> std::vector&lt;long&gt;&amp; input);</div>
<div class="line"><a name="l00139"></a><span class="lineno">  139</span>&#160; </div>
<div class="line"><a name="l00146"></a><span class="lineno">  146</span>&#160;  <a class="code" href="classhelib_1_1_poly_mod.html">PolyMod</a>&amp; <a class="code" href="classhelib_1_1_poly_mod.html#a525bedf9f9045606f4671a42a736330c">operator=</a>(<span class="keyword">const</span> std::initializer_list&lt;long&gt;&amp; input);</div>
<div class="line"><a name="l00147"></a><span class="lineno">  147</span>&#160; </div>
<div class="line"><a name="l00152"></a><span class="lineno">  152</span>&#160;  <a class="code" href="classhelib_1_1_poly_mod.html">PolyMod</a>&amp; <a class="code" href="classhelib_1_1_poly_mod.html#a525bedf9f9045606f4671a42a736330c">operator=</a>(<span class="keyword">const</span> NTL::ZZX&amp; input);</div>
<div class="line"><a name="l00153"></a><span class="lineno">  153</span>&#160; </div>
<div class="line"><a name="l00159"></a><span class="lineno">  159</span>&#160;  <span class="keyword">explicit</span> <span class="keyword">operator</span> long() <span class="keyword">const</span>;</div>
<div class="line"><a name="l00160"></a><span class="lineno">  160</span>&#160; </div>
<div class="line"><a name="l00164"></a><span class="lineno">  164</span>&#160;  <span class="keyword">explicit</span> <span class="keyword">operator</span> std::vector&lt;long&gt;() <span class="keyword">const</span>;</div>
<div class="line"><a name="l00165"></a><span class="lineno">  165</span>&#160; </div>
<div class="line"><a name="l00169"></a><span class="lineno">  169</span>&#160;  <span class="keyword">explicit</span> <span class="keyword">operator</span> NTL::ZZX() <span class="keyword">const</span>;</div>
<div class="line"><a name="l00170"></a><span class="lineno">  170</span>&#160; </div>
<div class="line"><a name="l00176"></a><span class="lineno">  176</span>&#160;  <span class="keywordtype">bool</span> <a class="code" href="classhelib_1_1_poly_mod.html#a14c70f6fbf3f033dcc68e5f13c643aa2">isValid</a>() <span class="keyword">const</span>;</div>
<div class="line"><a name="l00177"></a><span class="lineno">  177</span>&#160; </div>
<div class="line"><a name="l00182"></a><span class="lineno">  182</span>&#160;  <span class="keywordtype">long</span> <a class="code" href="classhelib_1_1_poly_mod.html#a27be7af41d6404b34e2323fc0e55feda">getp2r</a>() <span class="keyword">const</span>;</div>
<div class="line"><a name="l00183"></a><span class="lineno">  183</span>&#160; </div>
<div class="line"><a name="l00188"></a><span class="lineno">  188</span>&#160;  NTL::ZZX <a class="code" href="classhelib_1_1_poly_mod.html#ab7608856927e3b03532f372de93461c9">getG</a>() <span class="keyword">const</span>;</div>
<div class="line"><a name="l00189"></a><span class="lineno">  189</span>&#160; </div>
<div class="line"><a name="l00193"></a><span class="lineno">  193</span>&#160;  NTL::ZZX <a class="code" href="classhelib_1_1_poly_mod.html#a6a9f4945fa4b42b2fb327d6df7be0da0">getData</a>() <span class="keyword">const</span>;</div>
<div class="line"><a name="l00194"></a><span class="lineno">  194</span>&#160; </div>
<div class="line"><a name="l00200"></a><span class="lineno">  200</span>&#160;  <span class="keywordtype">bool</span> <a class="code" href="classhelib_1_1_poly_mod.html#adedd16aa53c06efce61c1f7925e9c953">operator==</a>(<span class="keyword">const</span> <a class="code" href="classhelib_1_1_poly_mod.html">PolyMod</a>&amp; rhs) <span class="keyword">const</span>;</div>
<div class="line"><a name="l00201"></a><span class="lineno">  201</span>&#160; </div>
<div class="line"><a name="l00208"></a><span class="lineno">  208</span>&#160;  <span class="keywordtype">bool</span> <a class="code" href="classhelib_1_1_poly_mod.html#adedd16aa53c06efce61c1f7925e9c953">operator==</a>(<span class="keywordtype">long</span> rhs) <span class="keyword">const</span>;</div>
<div class="line"><a name="l00209"></a><span class="lineno">  209</span>&#160; </div>
<div class="line"><a name="l00216"></a><span class="lineno">  216</span>&#160;  <span class="keywordtype">bool</span> <a class="code" href="classhelib_1_1_poly_mod.html#adedd16aa53c06efce61c1f7925e9c953">operator==</a>(<span class="keyword">const</span> std::vector&lt;long&gt;&amp; rhs) <span class="keyword">const</span>;</div>
<div class="line"><a name="l00217"></a><span class="lineno">  217</span>&#160; </div>
<div class="line"><a name="l00224"></a><span class="lineno">  224</span>&#160;  <span class="keywordtype">bool</span> <a class="code" href="classhelib_1_1_poly_mod.html#adedd16aa53c06efce61c1f7925e9c953">operator==</a>(<span class="keyword">const</span> NTL::ZZX&amp; rhs) <span class="keyword">const</span>;</div>
<div class="line"><a name="l00225"></a><span class="lineno">  225</span>&#160; </div>
<div class="line"><a name="l00232"></a><span class="lineno">  232</span>&#160;  <span class="keyword">template</span> &lt;<span class="keyword">typename</span> T&gt;</div>
<div class="line"><a name="l00233"></a><span class="lineno"><a class="line" href="classhelib_1_1_poly_mod.html#ac921528707f3912cad4d6392b3e871da">  233</a></span>&#160;  <span class="keywordtype">bool</span> <a class="code" href="classhelib_1_1_poly_mod.html#ac921528707f3912cad4d6392b3e871da">operator!=</a>(T&amp;&amp; rhs)<span class="keyword"> const</span></div>
<div class="line"><a name="l00234"></a><span class="lineno">  234</span>&#160;<span class="keyword">  </span>{</div>
<div class="line"><a name="l00235"></a><span class="lineno">  235</span>&#160;    <span class="keywordflow">return</span> !<a class="code" href="classhelib_1_1_poly_mod.html#adedd16aa53c06efce61c1f7925e9c953">operator==</a>(std::forward&lt;T&gt;(rhs));</div>
<div class="line"><a name="l00236"></a><span class="lineno">  236</span>&#160;  }</div>
<div class="line"><a name="l00237"></a><span class="lineno">  237</span>&#160; </div>
<div class="line"><a name="l00242"></a><span class="lineno">  242</span>&#160;  <a class="code" href="classhelib_1_1_poly_mod.html">PolyMod</a>&amp; <a class="code" href="classhelib_1_1_poly_mod.html#a97baf864ed5ebb0cd0710f22de74a9d1">negate</a>();</div>
<div class="line"><a name="l00243"></a><span class="lineno">  243</span>&#160; </div>
<div class="line"><a name="l00248"></a><span class="lineno">  248</span>&#160;  <a class="code" href="classhelib_1_1_poly_mod.html">PolyMod</a> <a class="code" href="classhelib_1_1_poly_mod.html#ab3ce9d93a47696878e5c6d8c731da0f8">operator-</a>() <span class="keyword">const</span>;</div>
<div class="line"><a name="l00249"></a><span class="lineno">  249</span>&#160; </div>
<div class="line"><a name="l00255"></a><span class="lineno">  255</span>&#160;  <a class="code" href="classhelib_1_1_poly_mod.html">PolyMod</a> <a class="code" href="classhelib_1_1_poly_mod.html#a619cc12544185e4f526a7d57cfd18300">operator*</a>(<span class="keyword">const</span> <a class="code" href="classhelib_1_1_poly_mod.html">PolyMod</a>&amp; rhs) <span class="keyword">const</span>;</div>
<div class="line"><a name="l00256"></a><span class="lineno">  256</span>&#160; </div>
<div class="line"><a name="l00262"></a><span class="lineno">  262</span>&#160;  <a class="code" href="classhelib_1_1_poly_mod.html">PolyMod</a> <a class="code" href="classhelib_1_1_poly_mod.html#a619cc12544185e4f526a7d57cfd18300">operator*</a>(<span class="keywordtype">long</span> rhs) <span class="keyword">const</span>;</div>
<div class="line"><a name="l00263"></a><span class="lineno">  263</span>&#160; </div>
<div class="line"><a name="l00269"></a><span class="lineno">  269</span>&#160;  <a class="code" href="classhelib_1_1_poly_mod.html">PolyMod</a> <a class="code" href="classhelib_1_1_poly_mod.html#a619cc12544185e4f526a7d57cfd18300">operator*</a>(<span class="keyword">const</span> NTL::ZZX&amp; rhs) <span class="keyword">const</span>;</div>
<div class="line"><a name="l00270"></a><span class="lineno">  270</span>&#160; </div>
<div class="line"><a name="l00276"></a><span class="lineno">  276</span>&#160;  <a class="code" href="classhelib_1_1_poly_mod.html">PolyMod</a> <a class="code" href="classhelib_1_1_poly_mod.html#a7296018a0c04986608ae03427cd7b226">operator+</a>(<span class="keyword">const</span> <a class="code" href="classhelib_1_1_poly_mod.html">PolyMod</a>&amp; rhs) <span class="keyword">const</span>;</div>
<div class="line"><a name="l00277"></a><span class="lineno">  277</span>&#160; </div>
<div class="line"><a name="l00283"></a><span class="lineno">  283</span>&#160;  <a class="code" href="classhelib_1_1_poly_mod.html">PolyMod</a> <a class="code" href="classhelib_1_1_poly_mod.html#a7296018a0c04986608ae03427cd7b226">operator+</a>(<span class="keywordtype">long</span> rhs) <span class="keyword">const</span>;</div>
<div class="line"><a name="l00284"></a><span class="lineno">  284</span>&#160; </div>
<div class="line"><a name="l00290"></a><span class="lineno">  290</span>&#160;  <a class="code" href="classhelib_1_1_poly_mod.html">PolyMod</a> <a class="code" href="classhelib_1_1_poly_mod.html#a7296018a0c04986608ae03427cd7b226">operator+</a>(<span class="keyword">const</span> NTL::ZZX&amp; rhs) <span class="keyword">const</span>;</div>
<div class="line"><a name="l00291"></a><span class="lineno">  291</span>&#160; </div>
<div class="line"><a name="l00297"></a><span class="lineno">  297</span>&#160;  <a class="code" href="classhelib_1_1_poly_mod.html">PolyMod</a> <a class="code" href="classhelib_1_1_poly_mod.html#ab3ce9d93a47696878e5c6d8c731da0f8">operator-</a>(<span class="keyword">const</span> <a class="code" href="classhelib_1_1_poly_mod.html">PolyMod</a>&amp; rhs) <span class="keyword">const</span>;</div>
<div class="line"><a name="l00298"></a><span class="lineno">  298</span>&#160; </div>
<div class="line"><a name="l00304"></a><span class="lineno">  304</span>&#160;  <a class="code" href="classhelib_1_1_poly_mod.html">PolyMod</a> <a class="code" href="classhelib_1_1_poly_mod.html#ab3ce9d93a47696878e5c6d8c731da0f8">operator-</a>(<span class="keywordtype">long</span> rhs) <span class="keyword">const</span>;</div>
<div class="line"><a name="l00305"></a><span class="lineno">  305</span>&#160; </div>
<div class="line"><a name="l00311"></a><span class="lineno">  311</span>&#160;  <a class="code" href="classhelib_1_1_poly_mod.html">PolyMod</a> <a class="code" href="classhelib_1_1_poly_mod.html#ab3ce9d93a47696878e5c6d8c731da0f8">operator-</a>(<span class="keyword">const</span> NTL::ZZX&amp; rhs) <span class="keyword">const</span>;</div>
<div class="line"><a name="l00312"></a><span class="lineno">  312</span>&#160; </div>
<div class="line"><a name="l00318"></a><span class="lineno">  318</span>&#160;  <a class="code" href="classhelib_1_1_poly_mod.html">PolyMod</a>&amp; <a class="code" href="classhelib_1_1_poly_mod.html#a1b1a8b0f3106866998738bcffffbe94d">operator*=</a>(<span class="keyword">const</span> <a class="code" href="classhelib_1_1_poly_mod.html">PolyMod</a>&amp; otherPoly);</div>
<div class="line"><a name="l00319"></a><span class="lineno">  319</span>&#160; </div>
<div class="line"><a name="l00325"></a><span class="lineno">  325</span>&#160;  <a class="code" href="classhelib_1_1_poly_mod.html">PolyMod</a>&amp; <a class="code" href="classhelib_1_1_poly_mod.html#a1b1a8b0f3106866998738bcffffbe94d">operator*=</a>(<span class="keywordtype">long</span> scalar);</div>
<div class="line"><a name="l00326"></a><span class="lineno">  326</span>&#160; </div>
<div class="line"><a name="l00332"></a><span class="lineno">  332</span>&#160;  <a class="code" href="classhelib_1_1_poly_mod.html">PolyMod</a>&amp; <a class="code" href="classhelib_1_1_poly_mod.html#a1b1a8b0f3106866998738bcffffbe94d">operator*=</a>(<span class="keyword">const</span> NTL::ZZX&amp; otherPoly);</div>
<div class="line"><a name="l00333"></a><span class="lineno">  333</span>&#160; </div>
<div class="line"><a name="l00339"></a><span class="lineno">  339</span>&#160;  <a class="code" href="classhelib_1_1_poly_mod.html">PolyMod</a>&amp; <a class="code" href="classhelib_1_1_poly_mod.html#a4399531354b0fad4ec28ac31fc79d102">operator+=</a>(<span class="keyword">const</span> <a class="code" href="classhelib_1_1_poly_mod.html">PolyMod</a>&amp; otherPoly);</div>
<div class="line"><a name="l00340"></a><span class="lineno">  340</span>&#160; </div>
<div class="line"><a name="l00346"></a><span class="lineno">  346</span>&#160;  <a class="code" href="classhelib_1_1_poly_mod.html">PolyMod</a>&amp; <a class="code" href="classhelib_1_1_poly_mod.html#a4399531354b0fad4ec28ac31fc79d102">operator+=</a>(<span class="keywordtype">long</span> scalar);</div>
<div class="line"><a name="l00347"></a><span class="lineno">  347</span>&#160; </div>
<div class="line"><a name="l00353"></a><span class="lineno">  353</span>&#160;  <a class="code" href="classhelib_1_1_poly_mod.html">PolyMod</a>&amp; <a class="code" href="classhelib_1_1_poly_mod.html#a4399531354b0fad4ec28ac31fc79d102">operator+=</a>(<span class="keyword">const</span> NTL::ZZX&amp; otherPoly);</div>
<div class="line"><a name="l00354"></a><span class="lineno">  354</span>&#160; </div>
<div class="line"><a name="l00360"></a><span class="lineno">  360</span>&#160;  <a class="code" href="classhelib_1_1_poly_mod.html">PolyMod</a>&amp; <a class="code" href="classhelib_1_1_poly_mod.html#aebd32d67c62394c84670527066d0c2c2">operator-=</a>(<span class="keyword">const</span> <a class="code" href="classhelib_1_1_poly_mod.html">PolyMod</a>&amp; otherPoly);</div>
<div class="line"><a name="l00361"></a><span class="lineno">  361</span>&#160; </div>
<div class="line"><a name="l00367"></a><span class="lineno">  367</span>&#160;  <a class="code" href="classhelib_1_1_poly_mod.html">PolyMod</a>&amp; <a class="code" href="classhelib_1_1_poly_mod.html#aebd32d67c62394c84670527066d0c2c2">operator-=</a>(<span class="keywordtype">long</span> scalar);</div>
<div class="line"><a name="l00368"></a><span class="lineno">  368</span>&#160; </div>
<div class="line"><a name="l00374"></a><span class="lineno">  374</span>&#160;  <a class="code" href="classhelib_1_1_poly_mod.html">PolyMod</a>&amp; <a class="code" href="classhelib_1_1_poly_mod.html#aebd32d67c62394c84670527066d0c2c2">operator-=</a>(<span class="keyword">const</span> NTL::ZZX&amp; otherPoly);</div>
<div class="line"><a name="l00375"></a><span class="lineno">  375</span>&#160; </div>
<div class="line"><a name="l00388"></a><span class="lineno">  388</span>&#160;  <span class="keyword">friend</span> std::istream&amp; <a class="code" href="classhelib_1_1_poly_mod.html#a0c68a6c4a6f71d995af3e35f048b2655">operator&gt;&gt;</a>(std::istream&amp; is, <a class="code" href="classhelib_1_1_poly_mod.html">PolyMod</a>&amp; poly);</div>
<div class="line"><a name="l00389"></a><span class="lineno">  389</span>&#160; </div>
<div class="line"><a name="l00397"></a><span class="lineno">  397</span>&#160;  <span class="keyword">friend</span> std::ostream&amp; <a class="code" href="classhelib_1_1_poly_mod.html#ad95f0357c85ab31896c211a12926233a">operator&lt;&lt;</a>(std::ostream&amp; os, <span class="keyword">const</span> <a class="code" href="classhelib_1_1_poly_mod.html">PolyMod</a>&amp; poly);</div>
<div class="line"><a name="l00398"></a><span class="lineno">  398</span>&#160; </div>
<div class="line"><a name="l00399"></a><span class="lineno">  399</span>&#160;<span class="keyword">private</span>:</div>
<div class="line"><a name="l00404"></a><span class="lineno">  404</span>&#160;  std::shared_ptr&lt;PolyModRing&gt; ringDescriptor;</div>
<div class="line"><a name="l00405"></a><span class="lineno">  405</span>&#160; </div>
<div class="line"><a name="l00409"></a><span class="lineno">  409</span>&#160;  NTL::ZZX data;</div>
<div class="line"><a name="l00410"></a><span class="lineno">  410</span>&#160; </div>
<div class="line"><a name="l00415"></a><span class="lineno">  415</span>&#160;  <span class="keywordtype">void</span> modularReduce();</div>
<div class="line"><a name="l00416"></a><span class="lineno">  416</span>&#160; </div>
<div class="line"><a name="l00422"></a><span class="lineno">  422</span>&#160;  <span class="keyword">static</span> <span class="keywordtype">void</span> assertValidity(<span class="keyword">const</span> <a class="code" href="classhelib_1_1_poly_mod.html">PolyMod</a>&amp; poly);</div>
<div class="line"><a name="l00423"></a><span class="lineno">  423</span>&#160; </div>
<div class="line"><a name="l00427"></a><span class="lineno">  427</span>&#160;  <span class="keyword">static</span> <span class="keywordtype">void</span> assertInterop(<span class="keyword">const</span> <a class="code" href="classhelib_1_1_poly_mod.html">PolyMod</a>&amp; lhs, <span class="keyword">const</span> <a class="code" href="classhelib_1_1_poly_mod.html">PolyMod</a>&amp; rhs);</div>
<div class="line"><a name="l00428"></a><span class="lineno">  428</span>&#160;};</div>
<div class="line"><a name="l00429"></a><span class="lineno">  429</span>&#160; </div>
<div class="line"><a name="l00430"></a><span class="lineno">  430</span>&#160;} <span class="comment">// namespace helib</span></div>
<div class="line"><a name="l00431"></a><span class="lineno">  431</span>&#160;<span class="preprocessor">#endif</span></div>
</div><!-- fragment --></div><!-- contents -->
<div class="ttc" id="aclasshelib_1_1_poly_mod_html_ad95f0357c85ab31896c211a12926233a"><div class="ttname"><a href="classhelib_1_1_poly_mod.html#ad95f0357c85ab31896c211a12926233a">helib::PolyMod::operator&lt;&lt;</a></div><div class="ttdeci">friend std::ostream &amp; operator&lt;&lt;(std::ostream &amp;os, const PolyMod &amp;poly)</div><div class="ttdoc">Output shift operator.</div><div class="ttdef"><b>Definition:</b> PolyMod.cpp:294</div></div>
<div class="ttc" id="aclasshelib_1_1_poly_mod_html_a619cc12544185e4f526a7d57cfd18300"><div class="ttname"><a href="classhelib_1_1_poly_mod.html#a619cc12544185e4f526a7d57cfd18300">helib::PolyMod::operator*</a></div><div class="ttdeci">PolyMod operator*(const PolyMod &amp;rhs) const</div><div class="ttdoc">Infix multiplication operator.</div><div class="ttdef"><b>Definition:</b> PolyMod.cpp:160</div></div>
<div class="ttc" id="aclasshelib_1_1_poly_mod_html_aeb89d0ed7ac9fa2c96e5a61caddef9d9"><div class="ttname"><a href="classhelib_1_1_poly_mod.html#aeb89d0ed7ac9fa2c96e5a61caddef9d9">helib::PolyMod::PolyMod</a></div><div class="ttdeci">PolyMod()</div><div class="ttdoc">Default constructor.</div><div class="ttdef"><b>Definition:</b> PolyMod.cpp:21</div></div>
<div class="ttc" id="aclasshelib_1_1_poly_mod_html_a7296018a0c04986608ae03427cd7b226"><div class="ttname"><a href="classhelib_1_1_poly_mod.html#a7296018a0c04986608ae03427cd7b226">helib::PolyMod::operator+</a></div><div class="ttdeci">PolyMod operator+(const PolyMod &amp;rhs) const</div><div class="ttdoc">Infix plus operator.</div><div class="ttdef"><b>Definition:</b> PolyMod.cpp:178</div></div>
<div class="ttc" id="aclasshelib_1_1_poly_mod_html_adedd16aa53c06efce61c1f7925e9c953"><div class="ttname"><a href="classhelib_1_1_poly_mod.html#adedd16aa53c06efce61c1f7925e9c953">helib::PolyMod::operator==</a></div><div class="ttdeci">bool operator==(const PolyMod &amp;rhs) const</div><div class="ttdoc">Equals operator between two PolyMod objects.</div><div class="ttdef"><b>Definition:</b> PolyMod.cpp:110</div></div>
<div class="ttc" id="aclasshelib_1_1_poly_mod_html_a525bedf9f9045606f4671a42a736330c"><div class="ttname"><a href="classhelib_1_1_poly_mod.html#a525bedf9f9045606f4671a42a736330c">helib::PolyMod::operator=</a></div><div class="ttdeci">PolyMod &amp; operator=(const PolyMod &amp;input)=default</div><div class="ttdoc">Assignment operator.</div></div>
<div class="ttc" id="aclasshelib_1_1_poly_mod_html_a6a9f4945fa4b42b2fb327d6df7be0da0"><div class="ttname"><a href="classhelib_1_1_poly_mod.html#a6a9f4945fa4b42b2fb327d6df7be0da0">helib::PolyMod::getData</a></div><div class="ttdeci">NTL::ZZX getData() const</div><div class="ttdoc">Getter function that returns the data of PolyMod as an NTL::ZZX.</div><div class="ttdef"><b>Definition:</b> PolyMod.cpp:104</div></div>
<div class="ttc" id="aclasshelib_1_1_poly_mod_html_a27be7af41d6404b34e2323fc0e55feda"><div class="ttname"><a href="classhelib_1_1_poly_mod.html#a27be7af41d6404b34e2323fc0e55feda">helib::PolyMod::getp2r</a></div><div class="ttdeci">long getp2r() const</div><div class="ttdoc">Get current p^r value.</div><div class="ttdef"><b>Definition:</b> PolyMod.cpp:100</div></div>
<div class="ttc" id="aclasshelib_1_1_poly_mod_html_a0c68a6c4a6f71d995af3e35f048b2655"><div class="ttname"><a href="classhelib_1_1_poly_mod.html#a0c68a6c4a6f71d995af3e35f048b2655">helib::PolyMod::operator&gt;&gt;</a></div><div class="ttdeci">friend std::istream &amp; operator&gt;&gt;(std::istream &amp;is, PolyMod &amp;poly)</div><div class="ttdoc">Input shift operator.</div><div class="ttdef"><b>Definition:</b> PolyMod.cpp:286</div></div>
<div class="ttc" id="aclasshelib_1_1_poly_mod_html_ab7608856927e3b03532f372de93461c9"><div class="ttname"><a href="classhelib_1_1_poly_mod.html#ab7608856927e3b03532f372de93461c9">helib::PolyMod::getG</a></div><div class="ttdeci">NTL::ZZX getG() const</div><div class="ttdoc">Get current G value.</div><div class="ttdef"><b>Definition:</b> PolyMod.cpp:102</div></div>
<div class="ttc" id="aclasshelib_1_1_poly_mod_html_abde46a8c8bf2c45613fbc04c7cf1f5c3"><div class="ttname"><a href="classhelib_1_1_poly_mod.html#abde46a8c8bf2c45613fbc04c7cf1f5c3">helib::PolyMod::PolyMod</a></div><div class="ttdeci">PolyMod(const PolyMod &amp;input)=default</div><div class="ttdoc">Default copy constructor.</div></div>
<div class="ttc" id="aclasshelib_1_1_poly_mod_html_ac7093980d7d850145dbb918c1c821930"><div class="ttname"><a href="classhelib_1_1_poly_mod.html#ac7093980d7d850145dbb918c1c821930">helib::PolyMod::operator=</a></div><div class="ttdeci">PolyMod &amp; operator=(PolyMod &amp;&amp;input)=default</div><div class="ttdoc">default move assignment operator</div></div>
<div class="ttc" id="aclasshelib_1_1_poly_mod_html_a4399531354b0fad4ec28ac31fc79d102"><div class="ttname"><a href="classhelib_1_1_poly_mod.html#a4399531354b0fad4ec28ac31fc79d102">helib::PolyMod::operator+=</a></div><div class="ttdeci">PolyMod &amp; operator+=(const PolyMod &amp;otherPoly)</div><div class="ttdoc">Plus equals operator with PolyMod rhs.</div><div class="ttdef"><b>Definition:</b> PolyMod.cpp:238</div></div>
<div class="ttc" id="aclasshelib_1_1_poly_mod_html_ab3ce9d93a47696878e5c6d8c731da0f8"><div class="ttname"><a href="classhelib_1_1_poly_mod.html#ab3ce9d93a47696878e5c6d8c731da0f8">helib::PolyMod::operator-</a></div><div class="ttdeci">PolyMod operator-() const</div><div class="ttdoc">Unary minus operator.</div><div class="ttdef"><b>Definition:</b> PolyMod.cpp:152</div></div>
<div class="ttc" id="aclasshelib_1_1_poly_mod_html_ac921528707f3912cad4d6392b3e871da"><div class="ttname"><a href="classhelib_1_1_poly_mod.html#ac921528707f3912cad4d6392b3e871da">helib::PolyMod::operator!=</a></div><div class="ttdeci">bool operator!=(T &amp;&amp;rhs) const</div><div class="ttdoc">Not equals operator.</div><div class="ttdef"><b>Definition:</b> PolyMod.h:233</div></div>
<div class="ttc" id="aclasshelib_1_1_poly_mod_html_acabfe2e0ceb18342c0e0ad40fe451251"><div class="ttname"><a href="classhelib_1_1_poly_mod.html#acabfe2e0ceb18342c0e0ad40fe451251">helib::PolyMod::~PolyMod</a></div><div class="ttdeci">~PolyMod()=default</div><div class="ttdoc">Default destructor.</div></div>
<div class="ttc" id="aclasshelib_1_1_poly_mod_html_aebd32d67c62394c84670527066d0c2c2"><div class="ttname"><a href="classhelib_1_1_poly_mod.html#aebd32d67c62394c84670527066d0c2c2">helib::PolyMod::operator-=</a></div><div class="ttdeci">PolyMod &amp; operator-=(const PolyMod &amp;otherPoly)</div><div class="ttdoc">Minus equals operator with PolyMod rhs.</div><div class="ttdef"><b>Definition:</b> PolyMod.cpp:262</div></div>
<div class="ttc" id="aclasshelib_1_1_poly_mod_html_a5ea5d7bc3cf99fb0941fd5a134b38cb7"><div class="ttname"><a href="classhelib_1_1_poly_mod.html#a5ea5d7bc3cf99fb0941fd5a134b38cb7">helib::PolyMod::PolyMod</a></div><div class="ttdeci">PolyMod(PolyMod &amp;&amp;input) noexcept=default</div><div class="ttdoc">Default move constructor.</div></div>
<div class="ttc" id="anamespacehelib_html"><div class="ttname"><a href="namespacehelib.html">helib</a></div><div class="ttdef"><b>Definition:</b> apiAttributes.h:21</div></div>
<div class="ttc" id="aclasshelib_1_1_poly_mod_html_a97baf864ed5ebb0cd0710f22de74a9d1"><div class="ttname"><a href="classhelib_1_1_poly_mod.html#a97baf864ed5ebb0cd0710f22de74a9d1">helib::PolyMod::negate</a></div><div class="ttdeci">PolyMod &amp; negate()</div><div class="ttdoc">Negate function.</div><div class="ttdef"><b>Definition:</b> PolyMod.cpp:145</div></div>
<div class="ttc" id="a_poly_mod_ring_8h_html"><div class="ttname"><a href="_poly_mod_ring_8h.html">PolyModRing.h</a></div><div class="ttdoc">Definition of the plaintext slot algebraic ring.</div></div>
<div class="ttc" id="aclasshelib_1_1_poly_mod_html_a1b1a8b0f3106866998738bcffffbe94d"><div class="ttname"><a href="classhelib_1_1_poly_mod.html#a1b1a8b0f3106866998738bcffffbe94d">helib::PolyMod::operator*=</a></div><div class="ttdeci">PolyMod &amp; operator*=(const PolyMod &amp;otherPoly)</div><div class="ttdoc">Times equals operator with PolyMod rhs.</div><div class="ttdef"><b>Definition:</b> PolyMod.cpp:214</div></div>
<div class="ttc" id="aclasshelib_1_1_poly_mod_html"><div class="ttname"><a href="classhelib_1_1_poly_mod.html">helib::PolyMod</a></div><div class="ttdoc">An object that contains an NTL::ZZX polynomial along with a coefficient modulus p2r and a polynomial ...</div><div class="ttdef"><b>Definition:</b> PolyMod.h:47</div></div>
<div class="ttc" id="aclasshelib_1_1_poly_mod_html_a14c70f6fbf3f033dcc68e5f13c643aa2"><div class="ttname"><a href="classhelib_1_1_poly_mod.html#a14c70f6fbf3f033dcc68e5f13c643aa2">helib::PolyMod::isValid</a></div><div class="ttdeci">bool isValid() const</div><div class="ttdoc">Gets the validity of this. This will be false iff this was default constructed.</div><div class="ttdef"><b>Definition:</b> PolyMod.cpp:98</div></div>
<!-- HTML footer for doxygen 1.8.8-->
<!-- start footer part -->
</div>
</div>
</div>
</div>
</div>
<hr class="footer"/><address class="footer"><small>
Generated by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.18
</small></address>
</body>
        <script type="text/javascript" src="doxy-boot.js"></script>
</html>
